import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'
import './plugins/element.js'

Vue.config.productionTip = false

axios.interceptors.request.use(
    config => {
      if (localStorage.getItem("access-data") != null) {
        let account = JSON.parse(localStorage.getItem('access-data'));
        config.headers["token"] = account.token;
      }

      return config;
    },
    err => Promise.reject(err)
);

new Vue({
  router,
  store,
  render: h => h(App)
  ,
}).$mount('#app')
